﻿<div class="right_col" id="right_col">

<!--     sidebar starts here   -->

<!-- follower icons div -->
<div class="sidebar_data" >
    <h2>Find me on other sites</h2>

    <div class="follow_icon">

<!-- base url is set in header.php so relative url will work here -->

<a href="http://www.twitter.com/godhulii" style="min-height:50px;min-width:50px;">
        <img alt="@godhulii" src="images/twitter.jpg" title="follow me @godhulii"> </a>
<a href="http://somewhereinblog.net/blog/seoul">
        <img alt="somewhereinblog.net/blog/seoul" src="images/somewhereinblog.jpg" title="somewhereinblog.net/blog/seoul"> </a>
<a rel="author" href="https://plus.google.com/116557245428845982122" >
        <img alt="https://plus.google.com/116557245428845982122" src="images/google+.png" title="https://plus.google.com/116557245428845982122" /> </a>
<a href="http://www.youtube.com/seoulbuet" >
        <img alt="bookmark this site" src="images/youtube.gif" title="youtube.com/user/seoulbuet"> </a>
<a href="http://flickr.com/photos/seoulbuet" >
        <img alt="flickr.com/photos/seoulbuet" src="images/flickr.gif" title="flickr.com/photos/seoulbuet"> </a>
<a href="http://www.buetian.com/" >
        <img alt="buetian.com" src="images/buet87foundation.jpg" title="buetian.com"> </a>

<img alt="????(upcoming)" title="????(upcoming)" src="images/upcoming.jpg">

    </div>
</div>


<!-- custom search+post area -->
<div class="sidebar_data">
    <h2>Services</h2>

<!--    keyboard choose options -->
    <select class="change_keyboard">
        <option title="English layout" selected="selected" value="english">English keyboard</option>
        <option title="Bangla(Rokeya) layout" value="rokeya">Rokeya layout</option>
    </select>

<form action="" id="sidebarInputForm">
    <input type="text" size="45" value="" id="get_input" class="" />
    <div class="clear"></div>
    <div class="customActionDivM">
            <div id="divInputSearchThisSite" >
                <input type="radio" name="sidebarInput" class="inputSearch" checked='checked' value="site" />
                <label>Search this Site</label>
            </div>
            <div id="divInputSearchWeb">
                <input type="radio" name="sidebarInput" class="inputSearch" value="web" />
                <label>Search web</label>
            </div>
    </div>

    <input type="submit" value="Submit" id="get_input_SidebarSubmit" name="submit" class="inputSearch submit" />
</form>

<script language="JavaScript" type="text/javascript">

    $("#get_input").val("").change( function() {
        //var temp=$("<a href='"+this.value+"'></a>");
        //console.log(temp);
    });

    $("#get_input_SidebarSubmit").click( function(e){

        var radioValue= $("input[type='radio'][name='sidebarInput']:checked").val();
        var text=$("#get_input").val();
        e.preventDefault();

        switch (radioValue) {
          case 'site':
            //google-custom-search engine codes goes here
			var tempUrl="https://www.google.com/search?hl=en&as_q=";
			tempUrl += encodeURIComponent(text);
			tempUrl += "&as_epq=&as_oq=&as_eq=&as_nlo=&as_nhi=&lr=&cr=&as_qdr=all&as_sitesearch="+window.location.host;
			
			tempUrl += "&as_occt=any&safe=images&tbs=&as_filetype=&as_rights=";
			window.open(tempUrl);
          break;

          case 'web':
            window.open("http://www.google.com/search?q="+encodeURIComponent(text),
             "menubar=0, resizable=0, status=1, toolbar=0, location=1");
          break;

          case 'delicious':
            var expression=/(http[s]?:\/\/){0,1}(www\.){0,1}[a-zA-Z0-9\.\-]+\.[a-zA-Z]{2,4}\//;
            var flag= expression.test(text);
            if( flag)
            {
                //impliement
            }
            else
                alert("Please enter a valid url to save in delicious...");
            alert(flag);
          break;

          case 'tweet':
            window.open("http://www.twitter.com/intent/tweet?text="+ text,
             "menubar=0, resizable=0, status=1, toolbar=0, location=1");
          break;
        }
        //alert($("input[type='radio'][name='sidebarInput']:checked").val());
        //return false;
    });
</script>
</div> <!-- custom search+post area -->

<div class="sidebar_data">
    <h2>Site insight</h2>
    <?php include_once(dirname(__FILE__). "/../customPhpScript/tabs.php"); ?>
</div>


<div class="sidebar_data">
    <h2>NatGeo- Photo of the day</h2>
    <div>
	<a href="" id="natgeoPicHref" title="" target="_blank"><img id="natgeoPicSrc" src="" width="300" height="250" alt="" /></a>
	<script type="text/javascript">
		function parseRSS(url) {
		  $.ajax({
			url: document.location.protocol + '//ajax.googleapis.com/ajax/services/feed/load?v=1.0&num=1&callback=?&q=' + encodeURIComponent(url),
			dataType: 'json',
			success: function(data) {
			  //callback(data.responseData.feed);
			  //console.log(data);
			  var img= data.responseData.feed.entries[0].mediaGroups[0].contents[0].url;
			  var title= data.responseData.feed.entries[0].title;
			  $("#natgeoPicHref").attr("title",title).attr("href",data.responseData.feed.entries[0].link);
			  $("#natgeoPicSrc").attr("src",img);
			}
		  });
		}
		parseRSS("http://feeds.nationalgeographic.com/ng/photography/photo-of-the-day/");
	</script>
    
    </div>
</div>

<!-- base url is set in header.php so relative url will work here -->

<div class="sidebar_data">
    <h2>Helpful mobile sites</h2>
    <div class="avatar_iframe_src">

        <a href="http://tunein.com/tuner/?StationId=16959&#" title="Online radio" target="_blank">
            <img src="images/radio.jpg" alt="Online radio" />
        </a>
        <a href="http://www.techmeme.com/m" target="iframe_container">
            <img src="images/engadget.jpg" alt="engadget news" />
        </a>
        <a href="http://m.somewhereinblog.net" target="iframe_container">
            <img src="images/somewhereinblog.jpg" alt="somewhereinblog"/>
        </a>
        <a href="http://m.skysports.com/football" target="iframe_container">
            <img src="images/football_icon.gif" alt="epl news"/>
        </a>
        <a href="http://m.espncricinfo.com" target="iframe_container">
            <img src="images/cricket_icon.jpeg" alt="cricinfo" />
        </a>
    </div>

    <iframe id="iframe_container" name="iframe_container"
    src="http://m.somewhereinblog.net"></iframe>
</div>

</div> <!-- sidebar div ends here -->